package cn.cai.exceptionAdvice;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import java.io.IOException;

/**
 * 统一异常处理
 */
@ControllerAdvice
public class GlobalExceptionAdvice {
    @ExceptionHandler(value = IOException.class)
    public void connectionTimeoutHandling(){
        System.out.println("连接超时异常");
    }
}
